﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DirectorateListFrame.ascx.cs" Inherits="MockPrjTeam2.Pages.ControlOrg.DirectorateListFrame" %>

<script type="text/javascript">
    function Confirm_Active() {
        return confirm('Do you want active this Supporting Material');
    }
</script>
<asp:Panel runat="server">
    <div class="titleh">
        <h3 class="sorting_range">
                     <asp:LinkButton ID="LinkButtonAll" runat="server" CssClass="hg-blue" CommandName="0-9-a-z"
                            OnCommand="FilterByLetters_Command">All</asp:LinkButton>
                        <asp:LinkButton ID="LinkButton09" runat="server" CommandName="0-9" OnCommand="FilterByLetters_Command">0-9</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonAE" runat="server" CommandName="a-e" OnCommand="FilterByLetters_Command">A B C D E</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonFJ" runat="server" CommandName="f-j" OnCommand="FilterByLetters_Command">F G H I J</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonKN" runat="server" CommandName="k-n" OnCommand="FilterByLetters_Command">K L M N</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonOR" runat="server" CommandName="o-r" OnCommand="FilterByLetters_Command">O P Q R</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonSV" runat="server" CommandName="s-v" OnCommand="FilterByLetters_Command">S T U V</asp:LinkButton>
                        <asp:LinkButton ID="LinkButtonWZ" runat="server" CommandName="w-z" CssClass="last"
                            OnCommand="FilterByLetters_Command"> W X Y Z</asp:LinkButton>
            <span class="right">
                <asp:LinkButton ID="LinkButtonCreate" runat="server" CssClass="hg-blue" 
                onclick="LinkButtonCreate_Click" CausesValidation="False">Create</asp:LinkButton>
                <asp:CheckBox ID="CheckBoxInactive" runat="server" Text="Include In-active" AutoPostBack="True"
                    OnCheckedChanged="CheckBoxInactive_CheckedChanged" />
            </span>
        </h3>
    </div>
    <asp:GridView  ID="GridViewDirectorate"
        CssClass="tablesorter" runat="server" AutoGenerateColumns="False" AllowPaging="True"
        PageSize="15" AllowSorting="True" 
        onpageindexchanging="GridViewDirectorate_PageIndexChanging">
        <Columns>
           
            <asp:TemplateField HeaderText="Directorate Name" SortExpression="DirectorateName">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButtonDirectorateName" CausesValidation="false" runat="server" CommandName='<%# Eval("DirectorateID") %>' CommandArgument='<%#Eval("IsActive") %>'
                        OnClientClick='<%# !(bool)Eval("IsActive") ? "return Confirm_Active();" : string.Empty %>' OnCommand="LinkButtonDirectorateName_Command"><%# Eval("DirectorateName") %></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle CssClass="header" Width="157px"/>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Office Address Line1" >
                <ItemTemplate>
                    <%#Eval("AddressLine1")%>
                </ItemTemplate>
                <HeaderStyle CssClass="header" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="PostCode">
                <ItemTemplate>
                    <%#Eval("PostCode")%>
                </ItemTemplate>
                <HeaderStyle CssClass="header" Width="150px"/>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Contact" >
                <ItemTemplate>
                      <%#Eval("ContactName")%>
                </ItemTemplate>
                <HeaderStyle CssClass="header" Width="112px"/>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Is Active?" >
                <ItemTemplate>
                    <%#(bool) Eval("IsActive") ? "Yes" : "No"%>
                </ItemTemplate>
                <HeaderStyle CssClass="header" Width="85px"/>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
                        <blockquote>There are no items to show.</blockquote>
                    </EmptyDataTemplate>
        <PagerStyle CssClass="pagination_table"></PagerStyle>
    </asp:GridView>
    <asp:HiddenField ID="HiddenFielorgId" runat="server" />
 </asp:Panel>
<div class="grid740 simplebox">
</div>